<admintpl file="header" />
<link href="__TMPL__Public/assets/css/infomation.css" rel="stylesheet" />
</head>
<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li><a href="{:U('ConstructionExamination/index')}">报审报验表管理</a></li>
            <if condition="($Role eq 2) AND ($userrole['role'] eq 5)">
            	<li><a href="{:U('ConstructionExamination/add')}">新增报审报验</a></li>
            </if>
            <li class="active"><a href="{:U('ConstructionExamination/view', array('id'=>I('request.id/s','')))}">查看报审报验</a></li>
        </ul> 
        <section class="tab-pane active fade in" id="access">
            <div class="row">
                <div class="col-xs-12 col-md-12 col-lg-12">
                    <div class="panel panel-info">
                        <div class="panel-body">
                            <form method="post" class="form-horizontal " action="{:U('ConstructionExamination/audit_post')}">
                                <input type="hidden" name="table_id" value="{$result.id}" />
                                <input type="hidden" name="audit_level" value="{$result.audit_level}" />
                                <div class="row tg-header">
                                    <div class="col-md-12 text-center">
                                        <h3>
                                        <if condition="$result['audit_level'] eq 1">
                                        　　<select style=" height: 40px" name="construction_category">
                                                <option value="1" <if condition="$result['construction_category'] eq 1">selected</if>>隐蔽工程质量检验资料</option>
                                                <option value="2" <if condition="$result['construction_category'] eq 2">selected</if>>检验批质量检验资料</option>
                                                <option value="3" <if condition="$result['construction_category'] eq 3">selected</if>>分项工程质量检验资料</option>
                                                <option value="4" <if condition="$result['construction_category'] eq 4">selected</if>>检测机构证明资料</option>　　
                                                <option value="5" <if condition="$result['construction_category'] eq 5">selected</if>>其他</option>
                                            </select>报审、报验表</h3>
                                        <else />
                                        	<php>
                                            	$array = array(
                                                	'1' => '隐蔽工程质量检验资料',
                                                	'2' => '检验批质量检验资料',
                                                	'3' => '分项工程质量检验资料',
                                                	'4' => '检测机构证明资料',
                                                	'5' => '其他',
                                                );
                                            	echo $array[$result['construction_category']].' 报审、报验表';
                                            </php>
                                        </if>
                                        <hr />
                                    </div>

                                    <div class="col-md-12">
                                        <p class="tg-to"><label>工程名称:</label><input type="text" class="input-xt input-deptname"  disabled value="{$job_name}" readonly/></p>
    									<p class="pull-right tg-serialnum"><label>编号:</label><input class="input-xt" name="code" required value="{$result.code}" readonly/></p>
                                    </div>
                                </div>

                                <table class="table table-bordered">
                                    <tr>
                                        <td style="border-right:none !important;">
                                            <p>
                                                <label>致：<input type="text" class="input-xt"  name="supervisory_department" required value="浙江泛华工程监理有限公司" readonly/>（项目监理机构）:</label>
                                            </p>
                                            <p class="indent20">
                                                我方已完成<input type="text" class="input-xt" name="position" required value="{$result.complete_construction_position}" readonly/>工作，经自检合格，请予以审查或验收。
                                            </p>
                                            <p></p>
                                            <p class="indent20">
                                                附件
                                                <div class="controls" style="margin-left: 20px">   
                                                <ol>
                                                	<if condition="$result['audit_level'] eq 1">
                                                        <li>
                                                            <span style="width:200px !important;">隐蔽工程质量检验资料</span>
                                                            <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachment_1" style="padding: 6px;margin-left:15px; margin-bottom: 15px; line-height: 0.7em;">上传</a>
                                                            <span class="controls" style="margin-left:10px;">   
                                                                <input type="hidden" name="attachment_1" value="{$result.attachment_1}">    
                                                                <input type="hidden" name="attachment_1_name" value="{$result.attachment_1_name}">    
                                                                {$result.attachment_1_name}
                                                            </span>
                                                        </li>
                                                        <li>
                                                            <span style="width:200px !important;">检验批质量检验资料</span>
                                                            <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachment_2" style="padding: 6px;margin-left:15px; margin-bottom: 15px;line-height: 0.7em;">上传</a>
                                                            <span class="controls" style="margin-left:10px;">   
                                                                <input type="hidden" name="attachment_2" value="{$result.attachment_2}">    
                                                                <input type="hidden" name="attachment_2_name" value="{$result.attachment_2_name}">    
                                                                {$result.attachment_2_name}
                                                            </span>
                                                        </li>
                                                        <li>
                                                            <span style="width:200px !important;">分项工程质量检验资料</span>
                                                            <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachment_3" style="padding: 6px;margin-left:15px; margin-bottom: 15px;line-height: 0.7em;">上传</a>
                                                            <span class="controls" style="margin-left:10px;">   
                                                                <input type="hidden" name="attachment_3" value="{$result.attachment_3}">    
                                                                <input type="hidden" name="attachment_3_name" value="{$result.attachment_3_name}">    
                                                                {$result.attachment_3_name}
                                                            </span>
                                                        </li>
                                                        <li>
                                                            <span style="width:200px !important;">施工试验室证明资料</span>
                                                            <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachment_4" style="padding: 6px;margin-left:15px; margin-bottom: 15px;line-height: 0.7em;">上传</a>
                                                            <span class="controls" style="margin-left:10px;">   
                                                                <input type="hidden" name="attachment_4" value="{$result.attachment_4}">    
                                                                <input type="hidden" name="attachment_4_name" value="{$result.attachment_4_name}">    
                                                                {$result.attachment_4_name}
                                                            </span>
                                                        </li>
                                                        <li>
                                                            <span style="width:200px !important;">其他</span>
                                                            <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachment_5" style="padding: 6px;margin-left:15px; margin-bottom: 15px;line-height: 0.7em;">上传</a>
                                                            <span class="controls" style="margin-left:10px;">   
                                                                <input type="hidden" name="attachment_5" value="{$result.attachment_5}">    
                                                                <input type="hidden" name="attachment_5_name" value="{$result.attachment_5_name}">    
                                                                {$result.attachment_5_name}
                                                            </span>
                                                        </li>
                                                    <else />
                                                        <li>
                                                        	<span style="width:200px !important;">隐蔽工程质量检验资料</span><br>
                                                            <a href="javascript:void(0);" class="fileDownload" path="{$result.attachment_1}" name="{$result.attachment_1_name}">
                                                                {$result.attachment_1_name}</a>
                                                        </li>
                                                        <li>
                                                        	<span style="width:200px !important;">检验批质量检验资料</span><br>
                                                            <a href="javascript:void(0);" class="fileDownload" path="{$result.attachment_2}" name="{$result.attachment_2_name}">
                                                                {$result.attachment_2_name}</a>
                                                        </li>
                                                        <li>
                                                        	<span style="width:200px !important;">分项工程质量检验资料</span><br>
                                                            <a href="javascript:void(0);" class="fileDownload" path="{$result.attachment_3}" name="{$result.attachment_3_name}">
                                                                {$result.attachment_3_name}</a>
                                                        </li>
                                                        <li>
                                                        	<span style="width:200px !important;">施工试验室证明资料</span><br>
                                                            <a href="javascript:void(0);" class="fileDownload" path="{$result.attachment_4}" name="{$result.attachment_4_name}">
                                                                {$result.attachment_4_name}</a>
                                                        </li>
                                                        <li>
                                                        	<span style="width:200px !important;">其他</span><br>
                                                            <a href="javascript:void(0);" class="fileDownload" path="{$result.attachment_5}" name="{$result.attachment_5_name}">
                                                                {$result.attachment_5_name}</a>
                                                        </li>
                                                    </if>
                                                </ol>
                                            </div>
                                            </p>
                                            <div class="signature">
                                                <p>
                                                    施工项目部（盖章）
                                                </p>
                                                <p>
                                                    项目经理或项目技术负责人（签字)
                                                </p>

                                            </div>
                                            <p class="signature-date">
                                                <span>{$result.publish_time|substr=0,4}&nbsp;年&nbsp;{$result.publish_time|substr=5,2}月&nbsp;{$result.publish_time|substr=8,2}日</span>
                                            </p>         
                                        </td>
                                    </tr>
                                    <if condition="$audit[3] and $result['audit_status'] eq '3'">
                                    	<tr>
                                            <td colspan="4">
                                                <label>审查意见：
                                                    <if condition="$audit[3]['audit_status'] eq 2">&nbsp;驳回<else />&nbsp;同意</if>
                                                </label>
                                                <textarea style="height:50px; width:100%" readonly >{$audit.3.audit_reason}</textarea>
                                                <div class="signature">
                                                    <p>项目监理机构(盖章)</p>
                                                    <p>专业监理工程师(签字)</p>
                                                 </div>
                                                 <div>
                                                    <p class="signature-date">
                                                        <span>年</span>
                                                        <span>月</span>
                                                        <span>日</span>
                                                    </p>
                                                </div>
                                            </td>
                                        </tr>
                                    </if>
                                    <if condition="$result['audit_status'] eq '2'">
                                        <tr>
                                            <td colspan="4">
                                                <label>审查意见：
                                                    &nbsp;驳回
                                                </label>
                                                <textarea style="height:50px; width:100%" readonly >{$reject.audit_reason}</textarea>
                                            </td>
                                        </tr>
                                    </if>
                                    <if condition="$isAudit eq '2'">
                                        <tr>
                                            <td colspan="4">
                                                <label>审查意见：
                                                    <if condition="$audit['audit_status'] eq 2">
                                                        <label style="width:50px;"><input type="radio" name="audit_status" value="1" />&nbsp;同意</label>
                                                        <label style="width:50px;"><input type="radio" name="audit_status" value="2" checked />&nbsp;驳回</label>
                                                    <else />
                                                        <label style="width:50px;"><input type="radio" name="audit_status" value="1" checked />&nbsp;同意</label>
                                                        <label style="width:50px;"><input type="radio" name="audit_status" value="2" />&nbsp;驳回</label>
                                                    </if>
                                                </label>
                                                <textarea style="height:50px; width:100%" name="audit_reason" >{$audit.audit_reason}</textarea>
                                            </td>
                                        </tr>
                                    </if>
                                </table>
                                <if condition="$result['audit_level'] eq 1">
                                	<input type="hidden" name="audit_status" value="1" />
                                	<input type="hidden" name="audit_reason" value="变更保存" />
                                </if>
                                <p class="text-muted tg-note">
                                    <small>注：本表一式二份，项目监理机构、施工单位各一份。</small>
                                </p>
                                <div class="form-actions">
                                    <if condition="$isAudit eq '2'">
                                    	<a class="btn btn-primary clickBtn" href="javascript:void(0);">{:L('SAVE')}</a>
                                    </if>
                                    <if condition="$result['audit_status'] eq 3">
                                    	<a class="btn btn-warning" href="javascript:$.print('#access');">打印</a>
                                    </if>
                                    <a class="btn btn-default" href="{:U('ConstructionExamination/index')}">{:L('BACK')}</a>
                                </div>
                            </form>                   
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript" src="__TMPL__Public/assets/js/audit.js"></script>
</body>
</html>